package com.kehao.leetcode.middle.math;

import org.junit.Test;

public class TrailingZeroesSolution {
    public int trailingZeroes(int n) {
        int result = 0;
        while (n!=0){
            n=n/5;
            result+=n;
        }
        return result;
    }

    @Test
    public void test01(){
        System.out.println(trailingZeroes(3));
        System.out.println(trailingZeroes(5));
        System.out.println(trailingZeroes(0));
    }
}
